<div class="pages">
	<span class="pages-step">
		<?php
		$params = $this->getParams();
		if ($this->recordCount <= $this->pageSize) {$pageCount = 1;}
		else {$pageCount = ceil($this->recordCount/$this->pageSize);}
		if ($this->currentPage <= 1) {
		    echo 'First | Prev | ';
		} else {
			$params['cpage'] = 1;
			echo '<a class="pages-link" href="'.$this->url($params, null, true).'">First</a> | ';
			$params['cpage'] = $this->currentPage - 1;
			echo '<a class="pages-link" href="'.$this->url($params, null, true).'">Prev</a> | ';
		}

		if ($this->currentPage < $pageCount) {
			$params['cpage'] = $this->currentPage + 1;
			echo ' <a class="pages-link" href="'.$this->url($params, null, true).'">Next</a> | ';
			$params['cpage'] = $pageCount;
			echo '<a class="pages-link" href="'.$this->url($params, null, true).'">End</a> ';
		} else {
		    echo 'Next | End ';
		}
		?>
	</span>
	<span style="margin: 0 10px;">
		Pages: <strong><?php echo $this->currentPage; ?></strong>/<strong><?php echo $pageCount; ?></strong>
		Records: <strong><?php echo ($this->currentPage - 1) * $this->pageSize; ?></strong>-<strong><?php echo $this->currentPage * $this->pageSize; ?></strong>
	</span>
	<span class="pages-jumper">
		Jump to:
		<select name="pages-jumper-list" class="pages-list" onchange="window.location=this.value">
			<?php
			for ($i = 1; $i<=$pageCount; $i++) {
				$params['cpage'] = $i;
				if ($this->currentPage == $i) { $extra = ' selected'; }
				else { $extra = ''; }
				echo '<option value="' . $this->url($params, null, true) . '"'.$extra.'>Page No: '. sprintf("%02d",$i) . '</option>';
			}
			?>
		</select>
	</span>
</div>